package com.liujiajin.utils;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * 日期工具类
 */

public class DateUtils {

    public static final String YYYY_MM_DD_HH_MM_SS = "yyyy-MM-dd HH:mm:ss";

    public static String date2Str(Date date, String pattern){
        SimpleDateFormat sdf = new SimpleDateFormat(pattern);

        String format = sdf.format(date);
        return format;
    }
}
